﻿<phone:PhoneApplicationPage 
    x:Class="tnet.MyFavorites"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:advert="clr-namespace:Microsoft.Advertising.Mobile.UI;assembly=Microsoft.Advertising.Mobile.UI" 
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" 
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="80"/>
        </Grid.RowDefinitions>

        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,5,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="www.transhumanity.net" Style="{StaticResource PhoneTextNormalStyle}" 
                       MouseLeftButtonUp="Home_MouseLeftButtonUp"/>
            <TextBlock x:Name="PageTitle" Text="My Favorites" Margin="9,0,0,0" FontSize="28" TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle1Style}" 
                       MouseLeftButtonUp="Home_MouseLeftButtonUp" />
        </StackPanel>

        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="0,0,0,0">
            <ListBox x:Name="FavLstBx" Margin="0,0,0,0" IsEnabled="True" Foreground="White" 
                         HorizontalAlignment="Left" Width="410" Height="625" VerticalAlignment="Top"
                         ItemContainerStyle="{StaticResource ListBoxItemStyle1}" Tap="NewsRSS_Tap">
                <ListBox.ItemTemplate >
                    <DataTemplate >
                        <Grid Height="70" Width="400" Margin="0,0,0,5" >
                            <Rectangle Fill="White" Opacity=".3" />
                            <Rectangle Fill="Black" Width="5" HorizontalAlignment="Left" Margin="5,0,0,0" />
                            <StackPanel Orientation="Horizontal" Width="350" Margin="20,5,5,5" >
                                <Image Source="{ Binding Path=Img}" Width="{ Binding Path=ImageWidth }" Height="70" Stretch="UniformToFill" />
                                <TextBlock Text="{ Binding Path=Title}" TextWrapping="Wrap" Margin="20,0,0,0" Width="270" Style="{StaticResource PhoneTextNormalStyle}" />
                            </StackPanel>

                            <toolkit:ContextMenuService.ContextMenu>
                                <toolkit:ContextMenu Name="TheBlazeContextMenu" Background="#365895" >
                                    <toolkit:MenuItem Header="pin article to home" Click="TheBlazeMenuItem_Click"  Foreground="White" Tag="{ Binding Path=FreezeDried}" />
                                    <toolkit:MenuItem Header="share on facebook" Foreground="White" Click="FacebookBox_Click" Tag="{ Binding Path=FreezeDried}"  />
                                    <toolkit:MenuItem Header="share on twitter" Foreground="White" Click="TwitterBox_Click" Tag="{ Binding Path=FreezeDried}" />
                                    <toolkit:MenuItem Header="email" Click="EmailNews_Click" Foreground="White"  Tag="{ Binding Path=FreezeDried}" />
                                    <toolkit:MenuItem Header="delete" Foreground="White"  Tag="{ Binding Path=FreezeDried}" Click="Delete_Click" />
                                </toolkit:ContextMenu>
                            </toolkit:ContextMenuService.ContextMenu>
                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>

        <!--<advert:AdControl x:Name="AdvertControl" ApplicationId="d204dadc-2fb5-4fa2-b6d0-6d99e3ea95d0" 
            AdUnitId="82622" AdModel="Contextual" Grid.Row="2"  RotationEnabled="True" 
             Width="480" Height="80" HorizontalAlignment="Left" VerticalAlignment="Bottom"
             UseLayoutRounding="False" d:LayoutRounding="Auto" d:LayoutOverrides="Height"  >
        </advert:AdControl>-->
    </Grid>

</phone:PhoneApplicationPage>
